//
//  EarMicrophone.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "EarMicrophone.h"

@implementation EarMicrophone

-(id)init
{
    
    _name = @"sony";
    _color = @"red";
    _value = 3245.345;
    [self info];
    return self;
    
}

-(void)info
{
    
    NSLog(@"%@ %@ %.2f", _name, _color, _value);
    
}

-(void)sold
{
    
    NSLog(@"%@色限量版%@耳机价值%.2f元", _color, _name, _value);
    
}


-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSString *)color
{
    return _color;
}
-(void)setColor:(NSString *)color
{
    _color = color;
}
-(CGFloat)value
{
    return _value;
}
-(void)setValue:(CGFloat)value
{
    _value = value;
}
-(id)initWithName:(NSString *)name color:(NSString *)color value:(CGFloat)value
{
    _name = name;
    _color = color;
    _value = value;
    return self;
}


+ (id)earmicrophoneWithName:(NSString *)name color:(NSString *)color value:(CGFloat)value
{
    EarMicrophone *e = [[EarMicrophone alloc] initWithName:name color:color value:value];
    return e;

}



@end
